onCreateContextMenu
open fun onCreateContextMenu(@NonNull menu: ContextMenu, @NonNull v: View, @Nullable menuInfo: ContextMenu.ContextMenuInfo)(source)
Called when a context menu for the view
is about to be shown. Unlike onCreateOptionsMenu, this will be called every time the context menu is about to be shown and should be populated for the view (or item inside the view for AdapterView subclasses, this can be found in the menuInfo
)).
Use onContextItemSelected to know when an item has been selected.
The default implementation calls up to Activity.onCreateContextMenu, though you can not call this implementation if you don't want that behavior.
It is not safe to hold onto the context menu after this method returns.